home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Tools / Mac F2C 1.3.3 / Mac F2C v1.3.3 Documentation / Mac F2C v1.3.3 Documentation.rsrc / TEXT_130.txt < prev    next >
Text File  |  1997-01-22  |  4KB  |  51 lines

  1. Quick Start
  2.  
  3.  
  4. Setting Up Mac F2C
  5.  
  6. Mac F2C is not ready to go out of the box.  You must first build all of the required supporting libraries and install supporting files where your compiler can find them.  
  7.  
  8. If you have MacOS System 7.5 (or any version with a scriptable Finder), 
  9. the installer script application included with Mac F2C will do all of this for you.  Simply double click on the Mac F2C Installer and answer the questions it asks you.  The installer will not only build all of the libraries and install supporting files, it will also build the test programs for you, leaving them in the folder Test Project Δí.  After the installer is finished, you should run these programs (by double-clicking on them) to verify the correct operation of Mac F2C.
  10.  
  11. The installer supports CodeWarrior IDE v1.7.4 (using the Metrowerks Standard Library), Symantec for PowerPC v8.0.4, and THINK (for 68K) v7.0.5.  
  12.  
  13. If you want to set-up the F2C for MPW package, a series of make files are provided to do this.  Please refer to the chapter ‚ÄúUsing F2C for MPW‚Äù for detailed instructions on setting-up and using this package.
  14.  
  15.  
  16.  
  17.  
  18.  
  19. If you do not have a version of the MacOS with a scriptable Finder (or if you have earlier versions of THINK, Symantec, or CodeWarrior) then you must build all of the libraries and install supporting files manually.  You should read the ‚ÄúSet Up‚Äù section of the chapter dedicated to the compiler you plan to use (these chapters are titled ‚ÄúUsing Mac F2C With‚Ķ‚Äù).  I also strongly recommend using the included test program to verify correct operation of Mac F2C and the support libraries.  Again, detailed information on how to do this is provided in the chapter of this documentation dedicated to the compiler you plan to use, in the section titled ‚ÄúVerifying Correct Operation of Mac F2C‚Äù.
  20.  
  21. If you don‚Äôt have MacOS System 7.5, click on your compiler‚Äôs icon to go to the corresponding instructions for setting up Mac F2C manually‚Ķ
  22.  
  23.    
  24.  
  25.  
  26.  
  27.  
  28. Translating with Mac F2C
  29.  
  30. You can use Mac F2C to translate FORTRAN to C by any of four methods:
  31.  
  32. ‚Ä¢ Start up Mac F2C and select the Translate command from the File menu.  
  33.     
  34. ‚Ä¢ Drag-&-drop a bunch of FORTRAN files onto Mac F2C.
  35.  
  36. ‚Ä¢ Write an AppleScript to drive Mac F2C.  Mac F2C is scriptable and conforms to the AppleEvents Object Model.
  37.   
  38.  
  39.  
  40.  
  41.  
  42. ‚Ä¢ If you are using Mac F2C with CodeWarrior, you can also use the CodeWarrior MPW/ToolServer tools to drive integrated Mac F2C - CodeWarrior builds.  
  43.      
  44. FORTRAN files must be TEXT files and must end in .f or .F (sorry, but the ending is determined by the unix f2c kernel‚Äîit rejects files handed to it with any other endings).  The output file is the same name with a .c extension if you selected C code for the output, or the same name with a .cp extension if you selected C++ code for the output.
  45.  
  46. The Options menu items and dialogs are generally self-explanatory.  If you don‚Äôt understand what an option means, or don‚Äôt understand why an option is dimmed, check the balloon help.  If you check the Make these the new defaults box before clicking the OK button, your option selections will be saved in a preference file and used again the next time you start Mac F2C.
  47.  
  48.  
  49. Using Code Generated by Mac F2C
  50.  
  51. After the translation, create a new project using one of the Mac F2C project models/stationary provided for your compiler.  Add the C files generated by Mac F2C to this project.  Bring everything up-to-date and you are ready to go.  If you use MPW, just copy and modify one of the included makefiles.